Everything Totally Explained


Ask & we'll explain, totally!
LALR parser
Totally Explained


  FOR SALE!Either this or the left-hand panel are available for just $19.95 per
day, or you can have both for only $34.95! Contact us for details.  


View this entry using RSS

Everything about Lalr Parser totally explained

In computer science, a lookahead LR parser or LALR parser is a specialized form of LR parser that can deal with more context-free grammars than Simple LR (SLR) parsers. It is a very popular type of parser because it gives a good trade-off between the number of grammars it can deal with and the size of the parsing tables it requires. It is these types of parsers that are most often generated by compiler-compilers such as yacc and GNU bison. Like SLR, LALR is a refinement to the technique for constructing LR(0) parse tables. While SLR uses follow sets to construct reduce actions, LALR uses lookahead sets, which are more specific because they take more of the parsing context into account. follow sets are associated with a symbol, while lookahead sets are specific to an LR(0) item and a parser state.
   Specifically, the follow set for a given LR(0) item I in a given parser state S contains all symbols that are allowed by the grammar to appear after I's left-hand-side nonterminal. In contrast, the lookahead set for item I in state S contains only those symbols that are allowed by the grammar to appear after I's right-hand-side has been parsed starting from state S. follow(I) is effectively the union of the lookahead sets for all LR(0) items with the same left-hand-side as I, regardless of parser states or right-hand-sides, therefore losing all context information. Because the lookahead set is specific to a particular parsing context, it can be more selective, therefore allowing finer distinctions than the follow set.

Further Information

Get more info on 'Lalr Parser'.


External Link Exchanges

Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:

    <a href="http://lalr_parser.totallyexplained.com">LALR parser Totally Explained</a>

Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
   As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned.



Copyright © 2007-8 totallyexplained.com | Licensed under the GNU Free Documentation License | Site Map
This article contains text from the Wikipedia article LALR parser (History) and is released under the GFDL | RSS Version